package com.utils;

/**
 * 状态码实体类
 */
public enum ResultCodeEnum {
    SUCCESS(true,200,"成功"),
    UNKNOWN_ERROR(false,20001,"未知错误"),
    SERVIVE_CLIENT_ERROR(false,500,"服务端错误"),
    PARAM_ERROR(false,20002,"参数错误"),
    HTTP_CLIENT_ERROR(false,40003,"HTTP客户端错误"),
    NULL_POINT(false,50001,"空指针异常")
    ;

    // 响应是否成功
    private Boolean success;
    // 响应状态码
    private Integer code;
    // 响应信息
    private String message;

    ResultCodeEnum(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }



    public Boolean getSuccess() {
        return success;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}